package com.aiwei.tdjk.service;


import com.aiwei.tdjk.bean.Pager;
import com.aiwei.tdjk.dto.request.CustomsHandbookUsedDetailPagerRequest;
import com.aiwei.tdjk.dto.response.CustomsHandbookUsedDetailPagerResponse;
import com.aiwei.tdjk.entity.CustomsHandbookUsedDetail;

import java.util.List;

public interface CustomsHandbookUsedDetailService {

    /**
     * 分页查询
     * @param request
     * @return
     */
    Pager<CustomsHandbookUsedDetailPagerResponse> find(CustomsHandbookUsedDetailPagerRequest request);

    /**
     * 分页查询
     * @param id
     * @return
     */
    CustomsHandbookUsedDetail get(Long id);


    List<CustomsHandbookUsedDetail> getListByDeliveryId(Long deliveryId);

    List<CustomsHandbookUsedDetail> getListBySaleOrderHeaderId(Long saleOrderHeaderId);

    /**
     * 根据手册项目查询手册使用明细
     * @param handBookId
     * @return
     */
    List<CustomsHandbookUsedDetail> getListByCustomerHandBookId(Long handBookId);


    List<Long> getHandbookProductdetailsIDs(Long handBookId);

    /**
     * 新增
     * @param customsHandbookUsedDetail
     * @return
     */
    int add(CustomsHandbookUsedDetail customsHandbookUsedDetail);

    /**
     * 更新
     * @param customsHandbookUsedDetail
     */
    void update(CustomsHandbookUsedDetail customsHandbookUsedDetail);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 获取已经报关的数量
     * @
     */
    int getHasDeclareCountByDetailId(Long handBookProductDetailId);

    /**
     * 获取已经商检未报关的数量
     */
    int getHasShangJianCountByDetailId(Long handBookProductDetailId);

    /**
     * 获取未冻结的数量
     */
    int getNotFrozenCountByDetailId(Long handBookProductDetailId);



}
